//
//  GMCamera.h
//
//  Created by gmlive on 2016/12/26.
//  Copyright © 2016年 gmlive. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@protocol GMCameraDelegate <NSObject>

- (void)didOutputVideoSampleBuffer:(CMSampleBufferRef)sampleBuffer;

@end

@interface GMCamera : NSObject

@property (nonatomic, assign) id<GMCameraDelegate> delegate;

- (instancetype)initWithCameraPosition:(AVCaptureDevicePosition)cameraPosition captureFormat:(int)captureFormat;

- (void)startCapture;

- (void)stopCapture;

- (void)changeCameraInputDeviceisFront:(BOOL)isFront;

@end
